import java.util.Scanner;

/**
 * Created with IDEA
 * author:ju bai
 * Date:2021/4/19
 * Time:21:31
 **/
public class Main {
    /**
     * 每日一题-求最小公倍数
     *
     * @param args
     */
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int A = sc.nextInt();
            int B = sc.nextInt();
            System.out.println((A * B) / gcd(A, B));
            System.out.println((A * B) / gdc(A, B));
        }
    }

    //求AB最大公约数
    public static int gcd(int A, int B) {
        if (B == 0) {
            return A;
        }
        return gcd(B, A % B);
    }


    //求AB最大公约数
    public static int gdc(int A, int B) {
        if (B == 0) {
            return A;
        }
        if (A < B) {//将AB中的A保持最大
            int temp = A;
            A = B;
            B = temp;
        }
        int r = 0;
        while ((r = A % B) > 0) {
            A = B;
            B = r;
        }
        return B;
    }
}
